import Vue from "vue";
import Router from "vue-router";
import Login from "@/view/login";
import WorkSpace from "@/view/workspace";

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: "/",
      name: "Login",
      component: Login
    },
    {
      path: "/login",
      name: "Login",
      component: Login
    },
    {
      path: "/workspace",
      name: "WorkSpace",
      component: WorkSpace,
      children: [
        {
          path: "roleManaged",
          component: () => import("../view/roleManaged")
        },
        {
          path: "adminUser",
          component: () => import("../view/adminUser")
        },
        {
          path: "activeManaged",
          component: () => import("../view/activeManaged")
        },
        {
          path: "activeType",
          component: () => import("../view/activeType")
        }
      ]
    }
  ]
});
